#ifndef WIFI_HAL_H
#define WIFI_HAL_H

#include "esp_wifi.h"

#define WIWI_AHL_DEBUG 1

#ifdef __cplusplus
extern "C"
{
#endif

    typedef struct
    {
        bool wifi_status;       /* !> 0-off 1-on */
        bool wifi_connect_proc; /* !> 0-off 1-on */
        uint8_t ssid[32];       /**< SSID of soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */
        uint8_t password[64];   /**< Password of soft-AP. */
    } wifi_hal_t;

    void wifi_switch_set(bool status);
    wifi_hal_t wifi_switch_panel(void);
    wifi_ap_record_t wifi_panel(void);
    void set_wifi_hal_conf_proc(bool status);
    void set_wifi_hal_conf(uint8_t *ssid, uint8_t *password);
    esp_err_t wifi_hal_connect(void);
    void wifi_status_task(void *arg);

#ifdef __cplusplus
}
#endif

#endif
